/*
 * @Author: Jone XIn
 * @Date: 2022-02-06 22:56:19
 * @LastEditTime: 2022-02-07 00:09:01
 * @Description: 
 */
const path = require('path');

module.exports = {
    entry: './src/index.ts',
    devtool: 'source-map',
    module: {
        rules: [
            {
                test: /\.ts?$/,
                use: 'ts-loader',
            },
            {
                test: /\.js$/,
                use: ['source-map-loader'],
                enforce: 'pre',
            },
        ],
    },
    resolve: {
        extensions: ['.ts', '.js'],
        fallback: {
            // "fs": false,
            // "tls": false,
            // "net": false,
            // "path": false,
            // "zlib": false,
            // "http": false,
            // "https": false,
            // "stream": false,
            // "crypto": false,
            // util: require.resolve("util/")
        }

    },
    output: {
        path: path.resolve(__dirname, '..', 'build'),
        // clean: true,
        // library: 'cmswrapper',
        // libraryTarget: 'umd',
        // umdNamedDefine: true,
    },
    plugins: [],
};
